Building the Model: General Elements > Resources > Node Logic Editor

Node Logic Editor

The Node Logic edit table is used to define special logic for a dynamic resource to perform upon entering or exiting a node. Node logic may be defined for any dynamic resource at any node. Typical uses of node logic are:

The fields of the Node Logic edit table are defined as follows:

 

Node The entry or departure node where the resource will process the logic.

 

Entry Logic Logic to be executed when a resource enters the node.

 

Exit Logic Logic to be executed when a resource leaves the node.

The table above was taken from the example contained on the following pages.

Node Logic Example

Suppose that for safety considerations we desire to keep track of the number of times both forklifts simultaneously enter a particular zone of the network consisting of branches N2 to N3, N3 to N4, and N3 to N5. (It is thought that this zone may be particularly susceptible to accidents due to heavy traffic.) We could accomplish this using node logic at the entry and exit points of the zone.

 

The only way to enter or exit the zone is through nodes N2 and N5. To track the number of forklifts currently in the zone, we increment and decrement a variable called Current. Each time a forkliftleaves node N2 or N5 en-route to node N3 we increment variable Current. Each time a forkliftenters node N2 or N5 enroute from N3 we decrement variable Current. Finally, each time we increment the variable Current, we check to see if Current > 1. If so, we increment a second variable called Total to record an occurrence of both forklifts in the zone at the same time.

 

The following windows show the entry and exit logic for node N2, representing one entry to the zone. The node logic for node N5 is identical to that for node N2.

Please Note: This example follows the rule that allows the Last() function to be used only in Node Entry Logic, while the Next() function may be used only in Node Exit Logic. (See Logic Elements).


© 2012 ProModel Corporation • 556 East Technology Avenue • Orem, UT 84097 • Support: 888-776-6633 • www.promodel.com